#ifndef __RULES_H
#define __RULES_H
#include <iostream>
#include<client/dbclient.h>
#include "logic.h"
#define HOSTNAME "localhost"
#define RULE "test.rules"
#define OCOLL "test.person"
class mquery
{
    private:
    mongo::DBClientConnection c;
    std::auto_ptr<mongo::DBClientCursor> cursor;
    std::list<mongo::BSONObj> rules;
    public:
    mquery();
    void fetchRules();
    void printRules();
    bool doQuery(std::string,mongo::BSONObj );
    std::list<std::string> match(mongo::BSONObj &);
    mongo::BSONObj filler(mongo::BSONObj &,mongo::BSONObj &);
};
#endif

